package com.gitee.cashzhang27.test.sdk.bestsign.domain;

import cn.hutool.http.Method;
import lombok.Data;

/**
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/08/05 14:47
 */
@Data
public abstract class AbstractBestSignRequest {

  /**
   * 开发者ID
   */
  private String developerId;
  /**
   * 开发者私钥
   */
  private String privateKey;
  /**
   * 测试环境
   */
  private String serverHost;
  /**
   * 方法名称
   */
  private String methodName;
  /**
   * 方法类型
   */
  private Method methodType;

  public void setConfig(String developerId, String privateKey, String serverHost) {
    this.developerId = developerId;
    this.privateKey = privateKey;
    this.serverHost = serverHost;
  }

  public abstract String getMethodName();

  public abstract Method getMethodType();

  public void clearImportantParams() {
    this.setDeveloperId(null);
    this.setPrivateKey(null);
    this.setServerHost(null);
  }

}
